package com.example.finalproject.order;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface OrderRepository {
    @Insert("insert into order_Car(carId,userName) values(#{carId},#{userName})")
    public void insertOrder(Order order);

    @Select("select * from order_Car where userName=#{userName}")
    public Order selectOrderByUserName(String userName);

    @Delete("delete from order_Car where userName=#{userName}")
    public void deleteOrderByUserName(String userName);

    @Select("select * from order_Car ")
    public Order selectAllOrder();
}
